<?php 

$login = array(
       'email' => 'hans.endonesia@gmail.com',
       'pass' => '02041994hans',
       'login' => 'login',
   );

//MENDAPATKAN LOGIN / COOKIE (coker_log)

$curl = curl_init();
   curl_setopt($curl, CURLOPT_URL,'https://m.facebook.com/login.php');
   curl_setopt($curl, CURLOPT_RETURNTRANSFER, 1);
   curl_setopt($curl, CURLOPT_POST, 1);
   curl_setopt($curl, CURLOPT_POSTFIELDS, $login);
   curl_setopt($curl, CURLOPT_SSL_VERIFYPEER, true);
   curl_setopt($curl, CURLOPT_ENCODING, '');
   curl_setopt($curl, CURLOPT_COOKIEJAR,'coker_log');
   curl_setopt($curl,CURLOPT_COOKIEFILE,'coker_log');
  $c_data = curl_exec($curl);
  curl_close($curl);

$get_token = auto('https://m.facebook.com/dialog/oauth?redirect_uri=https%3A%2F%2Flogin.skype.com%2FCOPY_ALL_THIS_URL&scope=publish_actions%2Cuser_photos%2Cfriends_photos%2Cuser_activities%2Cuser_likes%2Cuser_status%2Cfriends_status%2Cpublish_stream%2Cread_stream%2Cstatus_update&response_type=token&client_id=260273468396&seen_v4_nux=0');

function auto($url){
     $cx=curl_init();
     curl_setopt($cx,CURLOPT_URL,$url);
     curl_setopt($cx,CURLOPT_RETURNTRANSFER,1);
     curl_setopt($cx,CURLOPT_HEADER,1);
     curl_setopt($cx, CURLOPT_COOKIEFILE,'coker_log');
     $ch = curl_exec($cx);
     curl_close($cx);
     return($ch); 
 }

$cut = explode('token=',$get_token);
$cuts = explode('&expires',$cut[1]);
$access_token = $cuts[0];

/**
*
* - access_token di simpan di file toket.txt dalam folder yg sama
*
* -bila eksekusi pertama access_token ga nongol silakan eksekusi sekali lagi.... ato buka fb kamu biasanya ada notif ( BARU BARU INI AKUN ANDA bla bla bla.... ) klik ini oke dan coba eksekusi lagi ampe access_token nongol yg berarti dah tersimpan  
*
* - selanjutnya terserah ente hehe kikuk
*
BOT 100% WORK NO SPAM !!
Jika tidak percaya Follow fb http://m.facebook.com/
100008336359431*/

$file = fopen('toket.txt','w');
               fwrite($file,$access_token);
               fclose($file);

echo $access_token; 

 ?>